﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace ModelLibrary
{
    public class DrawingStatusImage
    {
        public DrawingStatusImage()
        {
            
        }

        public static Image StatusImage(Size size, bool status)
        {
            Bitmap btmap = new Bitmap(size.Width, size.Height);
            Graphics g = Graphics.FromImage(btmap);
            Brush bs = status ? Brushes.Green : Brushes.Red;
            Rectangle rect = new Rectangle(new Point(0, 0), size);
            rect.Inflate(-1, -1);
            g.DrawEllipse(new Pen(bs), rect);
            g.FillEllipse(bs, rect);
            g.Dispose();
            return btmap;
        }

    }
}
